<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
		$('#chrcount').keyup(function(){
			var len = $('#chrcount').val();
			var char = len.length;	
			if(254-char == 0){
				}
			$('#chrcountlength').html(255-char);	
		});
	});
	
	$(document).ready(function(){
		$('#chrcount2').keyup(function(){
			var len = $('#chrcount2').val();
			var char = len.length;	
			if(254-char == 0){
				}
			$('#chrcountlength2').html(255-char);	
		});
	});
</script>

<div id="mws-container" class="clearfix">
<div class="container">
  <div class="mws-panel grid_8">
    <div class="mws-panel-header"> <span class="mws-i-24 i-list">Edit Menu Item</span> </div>
    <div class="mws-panel-body">
      <div class="mws-form-inline"> <?php echo $form->create(array('action' => 'admin_menu_item_edit/'.$menu_item['MenuItem']['id'],'method'=>'post','class' => 'validateform mws-form', 'enctype' => 'multipart/form-data')); ?> <?php echo $form->input('MenuItem.id', array('type' => 'hidden' , 'value'=>$menu_item['MenuItem']['id'], 'class'=>'required', 'label' => false,'size'=>30)); ?>
        <div class="mws-form-row">
          <label>* Menu Item Title&nbsp; :</label>
          <div class="mws-form-item small"> <?php echo $form->input('MenuItem.item_title', array('type' => 'text' , 'value'=>''.$menu_item['MenuItem']['item_title'].'', 'class'=>'mws-textinput srequired', 'label' => false,'size'=>30)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> Menu Type:<em>*</em></label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.menu_id', array('options' => $menu_list, 'value'=>''.$menu_item['MenuItem']['menu_id'].'', 'class' => 'mws-textinput sdropbox', 'label' => false,'empty' => false)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> MenuItem Type<em>*</em></label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.item_type', array('options' => $menu_item_types, 'value'=>''.$menu_item['MenuItem']['item_type'].'', 'class' => 'mws-textinput dropbox', 'label' => false,'empty' => false)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> Parent Type<em>*</em></label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.parent_id', array('options' => $sub_menu_list,  'value'=>''.$menu_item['MenuItem']['parent_id'].'', 'class' => 'mws-textinput dropbox', 'label' => false,'empty' => false)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> Pages:</label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.page_id', array('options' => $pages_list, 'value'=>''.$menu_item['MenuItem']['page_id'].'', 'class' => 'mws-textinput dropbox', 'label' => false,'empty' => false)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> Item Url&nbsp;</label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.item_url', array('type' => 'text' ,'value'=>''.$menu_item['MenuItem']['item_url'].'', 'class'=>'mws-textinput ', 'label' => false,'size'=>30)); ?> </div>
        </div>
        <div class="mws-form-row">
          <label class="input-label"> Publish:</label>
          <div class="mws-form-item 	small"> <?php echo $form->input('MenuItem.published', array('options' => $published, 'value'=>''.$menu_item['MenuItem']['published'].'', 'class' => 'mws-textinput dropbox', 'label' => false,'empty' => false)); ?> </div>
        </div>
        <div class="mws-button-row">
          <input type="submit" class="mws-button black" value="Submit">
        </div>
        </form>
      </div>
    </div>
  </div>
</div>
